/**
 *====================================================
 * 文件名称: FinanceInsuranceActionApi.java
 * 修订记录：
 * No    日期				作者(操作:具体内容)
 * 1.    2015年9月26日			chenxy(创建:创建文件)
 *====================================================
 * 类描述：(说明未实现或其它不应生成javadoc的内容)
 */
package com.yuexunit.finance.project.action.v1;

import com.yuexunit.finance.context.FinVersion1;
import com.yuexunit.finance.project.action.v1.model.Insurance;
import com.yuexunit.finance.project.action.v1.model.input.InsuranceCoverageParams;
import com.yuexunit.finance.project.action.v1.model.input.InsuranceUpdateParams;
import com.yuexunit.finance.project.action.v1.model.output.ConstractCallbackDetail;
import com.yuexunit.finance.project.action.v1.model.output.FinanceContractDetail;
import com.yuexunit.finance.project.action.v1.model.output.FinanceFilesInfoDetail;
import com.yuexunit.finance.project.action.v1.model.output.InsuranceCoverageDetail;
import com.yuexunit.finance.project.action.v1.model.output.InsuranceDetail;
import com.yuexunit.finance.project.action.v1.model.output.InsuranceLineInfo;
import com.yuexunit.finance.project.action.v1.model.output.SignFileSealInfoDetail;
import com.yuexunit.finance.project.action.v1.model.output.SupervisionContractDetail;
import com.yuexunit.page.PageCriteria;
import com.yuexunit.page.PageList;
import com.yuexunit.web.annotation.Action;
import com.yuexunit.web.annotation.Parameter;
import com.yuexunit.web.annotation.Permission;

/** 
 * @ClassName: FinanceInsuranceActionApi 
 * @Description: 融资保险管理
 * @author chenxy 
 * @date 2015年9月26日 上午11:59:22  
 */
public interface FinanceContractActionApi {
	
	@Permission
	@Action(version = FinVersion1.class, description = "创建融资保单信息")
	@Parameter(name = "insuranceId", description = "保单ID")
	public String createInsurance(Insurance params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "创建融资保单险种信息")
	@Parameter(name = "insuranceCoverageId", description = "险种信息ID")
	public String createInsuranceCoverage(InsuranceCoverageParams params);

	@Permission
	@Action(version = FinVersion1.class, description = "修改融资保单信息")
	public void updateInsurance(InsuranceUpdateParams params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "删除融资保单险种信息")
	public void deleteInsuranceCoverage(
			@Parameter(name = "insuranceCoverageId", description = "险种信息ID") Long insuranceCoverageId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "同意融资保单信息")
	public void consentInsurance(
			@Parameter(name = "insuranceId", description = "保单信息ID") Long insuranceId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "拒绝融资保单信息")
	public void opposeInsurance(
			@Parameter(name = "insuranceId", description = "保单信息ID") Long insuranceId,
			@Parameter(name = "overReson", description = "拒绝原因") Integer overReson,
			@Parameter(name = "overRemark", description = "拒绝备注") String overRemark
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "审核融资保单信息")
	public void auditInsurance(
			@Parameter(name = "insuranceId", description = "保单信息ID") Long insuranceId,
			@Parameter(name = "auditAdvice", description = "审核意见") Boolean auditAdvice,
			@Parameter(name = "overRemark", description = "审批备注") String overRemark
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "撤销融资保单信息")
	public void revokeInsuranceDetail(
			@Parameter(name = "insuranceId", description = "保单信息ID") Long insuranceId,
			@Parameter(name = "overReson", description = "撤销原因") Integer overReson,
			@Parameter(name = "overRemark", description = "撤销备注") String overRemark
	);

	@Permission
	@Action(version = FinVersion1.class, description = "查询融资保单明细")
	public InsuranceDetail inquireInsuranceDetail(
			@Parameter(name = "insuranceId", description = "保单信息ID") Long insuranceId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询融资保单险种明细信息")
	public InsuranceCoverageDetail inquireInsuranceCoverageDetail(
			@Parameter(name = "insuranceCoverageId", description = "险种信息ID") Long insuranceCoverageId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "查询融资保单信息")
	public PageList<InsuranceLineInfo> inquireInsurancePageList(
			@Parameter(name = "insuranceNumber", description = "﻿保险单号", nullable = true) String insuranceNumber,
			@Parameter(name = "financeId", description = "﻿融资ID", nullable = true) Long financeId,
			@Parameter(name = "financeNumber", description = "﻿业务单号(融资单号)", nullable = true) String financeNumber,
			@Parameter(name = "dateBegin", description = "﻿投保日期-开始", nullable = true) String dateBegin,
			@Parameter(name = "dateEnd", description = "﻿投保日期-结束", nullable = true) String dateEnd,
			@Parameter(name = "applicant", description = "﻿投保人", nullable = true) String applicant,
			@Parameter(name = "coverageName", description = "﻿险种", nullable = true) String coverageName,
			@Parameter(name = "insuranceCompany", description = "﻿保险公司", nullable = true) String insuranceCompany,
			@Parameter(name = "insuranceState", description = "﻿保险状态 0:未知/1:待审批/2:已生效/3:已撤销", nullable = true) Integer insuranceState,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);
	
	//========================================================================================================//
	@Permission
	@Action(version = FinVersion1.class, description = "创建融资合同信息-电子签章")
	@Parameter(name = "financeContractId", description = "融资合同ID")
	public String createFinanceContract(
			@Parameter(name = "financeId", description = "﻿融资信息ID") Long financeId,
			@Parameter(name = "financeNumber", description = "融资编号") String financeNumber,
			@Parameter(name = "contractSignDate", description = "签订时间", nullable = true) String contractSignDate,
			@Parameter(name = "deliver", description = "﻿发货方") String deliver,
			@Parameter(name = "receive", description = "收货方") String receive,
			@Parameter(name = "financeContractSerialNumber", description = "融资合同序列号") String financeContractSerialNumber,
			@Parameter(name = "materials", description = "附件信息 多附件以逗号分割", nullable = true) String materials,
			@Parameter(name = "normIds", description = "融资附件标准ID") Long[] normId,
			@Parameter(name = "filesUuid", description = "融资附件UUID") String[] filesUuid,
			@Parameter(name = "filesSign", description = "是否签署") String[] filesSign,
			@Parameter(name = "contractType", description = "合同类型") Integer contractType,
			@Parameter(name = "isSign", description = "是否签章1:签章   0：不签章", nullable = true) String[] isSign,
			@Parameter(name = "signKey", description = "电子签章关键字", nullable = true) String signKey,
			@Parameter(name = "url", description = "路径", nullable = true) String url,
			@Parameter(name = "imageNames", description = "文件名", nullable = true) String imageNames
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "修改融资合同信息")
	public void updateFinanceContract(
			@Parameter(name = "financeContractId", description = "融资合同ID") Long financeContractId,
			@Parameter(name = "contractSignDate", description = "签订时间", nullable = true) String contractSignDate,
			@Parameter(name = "deliver", description = "﻿发货方") String deliver,
			@Parameter(name = "receive", description = "收货方") String receive,
			@Parameter(name = "financeContractSerialNumber", description = "融资合同序列号") String financeContractSerialNumber,
			@Parameter(name = "materials", description = "附件信息 多附件以逗号分割", nullable = true) String materials,
			@Parameter(name = "isSign", description = "是否签章1:签章   0：不签章", nullable = true)String[] isSign,
			@Parameter(name = "signKey", description = "电子签章关键字", nullable = true) String signKey,
			@Parameter(name = "url", description = "路径", nullable = true) String url,
			@Parameter(name = "imageNames", description = "文件名", nullable = true) String imageNames,
			@Parameter(name = "filesInfoId", description = "融资附件ID") Long[] filesInfoId,
			@Parameter(name = "filesUuid", description = "融资附件UUID") String[] filesUuid,
			@Parameter(name = "filesSign", description = "是否签署") String[] filesSign
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "单个文件打回")
	public void callBackFinanceContract(
			@Parameter(name = "financeId", description = "﻿融资信息ID") Long financeId,
			@Parameter(name = "fileUuid", description = "融资附件UUID") String fileUuid,
			@Parameter(name = "remark", description = "备注", nullable = true) String remark
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "合同替换-单个文件")
	public void replaceFinanceContract(
			@Parameter(name = "financeId", description = "融资ID") Long financeId,
			@Parameter(name = "oldFileUuid", description = "融资附件UUID") String oldFileUuid,
			@Parameter(name = "newFileUuid", description = "融资附件UUID") String newFileUuid,
			@Parameter(name = "remark", description = "备注", nullable = true) String remark
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "修改文件是否需要签署")
	public void changeFileSign(
			@Parameter(name = "fileUuid", description = "融资附件UUID") String fileUuid
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "合同确认-单个文件")
	public void confirmFinanceContract(
			@Parameter(name = "fileUuid", description = "融资附件UUID") String fileUuid,
			@Parameter(name = "financeId", description = "﻿融资信息ID") Long financeId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询合同文件详情")
	public FinanceFilesInfoDetail inquireFinanceFilesInfoDetail(
			@Parameter(name = "fileUuid", description = "融资附件UUID") String fileUuid
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "客户签署-电子签章")
	public String signCustomerFinanceContract(
			@Parameter(name = "financeContractId", description = "融资合同ID")Long financeContractId,
			@Parameter(name = "financeId", description = "﻿融资信息ID") Long financeId,
			@Parameter(name = "materials", description = "附件信息 多附件以逗号分割") String materials,
			@Parameter(name = "signKey", description = "电子签章关键字", nullable = true) String signKey,
			@Parameter(name = "url", description = "路径", nullable = true) String url
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "客户签署完成-提交")
	public void submitCustomerFinanceContract(
			@Parameter(name = "financeId", description = "﻿融资信息ID") Long financeId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "查询融资合同信息-根据合同ID(融资合同)")
	public FinanceContractDetail inquireFinanceContractDetail(
			@Parameter(name = "financeContractId", description = "融资合同ID") Long financeContractId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "查询融资合同信息-根据融资ID")
	public FinanceContractDetail inquireFinanceContract(
			@Parameter(name = "financeId", description = "﻿融资信息ID") Long financeId,
			@Parameter(name = "contractType", description = "合同类型 1:协议 2:合同") Integer contractType
	);

	@Permission
	@Action(version = FinVersion1.class, description = "合同确认")
	public void confirmContract(
			@Parameter(name = "financeId", description = "﻿融资信息ID") Long financeId,
			@Parameter(name = "contractType", description = "合同类型 1:协议 2:合同") Integer contractType,
			@Parameter(name = "remark", description = "备注", nullable = true) String remark
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "合同打回")
	public void callBackContract(
			@Parameter(name = "financeId", description = "融资ID") Long financeId,
			@Parameter(name = "financeContractId", description = "融资合同ID") Long financeContractId,
			@Parameter(name = "callBackReason", description = "﻿打回原因") String callBackReason,
			@Parameter(name = "callBackRemark", description = "打回说明") String callBackRemark,
			@Parameter(name = "contractType", description = "合同类型 1:协议 2:合同") Integer contractType
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "合同提交")
	public void submitContract(
			@Parameter(name = "financeId", description = "融资ID") Long financeId,
			@Parameter(name = "contractType", description = "合同类型 1:协议 2:合同") Integer contractType
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "合同打回记录列表")
	public PageList<ConstractCallbackDetail> inquireCallBackContractPageList(
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "合同打回记录列表")
	public ConstractCallbackDetail inquireCallBackContractDetail(
			@Parameter(name = "callBackId", description = "分页参数") Long callBackId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "合同范本上传")
	public void uploadFinanceConstractSample(
			@Parameter(name = "financeId", description = "融资ID") Long financeId,
			@Parameter(name = "financeConstractSample", description = "﻿融资合同范本附件,多附件用逗号分隔") String financeConstractSample
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询文件印章信息")
	public PageList<SignFileSealInfoDetail> inquireSignFileSealInfoPageList(
			@Parameter(name = "fileUuid", description = "文件Uuid") String fileUuid,
			@Parameter(name = "signState", description = "签署状态", nullable = true) Integer signState,
			@Parameter(name = "isAll", description = "企业ID", nullable = true) Boolean isAll,
			@Parameter(name = "page", description = "分页信息") PageCriteria page
	);
	//========================================================================================================//
	@Permission
	@Action(version = FinVersion1.class, description = "创建融资监管合同信息")
	@Parameter(name = "supervisionContractId", description = "监管合同ID")
	public String createSupervisionContract(
			@Parameter(name = "financeId", description = "﻿融资信息ID") Long financeId,
			@Parameter(name = "financeNumber", description = "融资编号") String financeNumber,
			@Parameter(name = "contractSignDate", description = "签订时间", nullable = true) String contractSignDate,
			@Parameter(name = "logisticsCompanyId", description = "﻿物流公司ID") Long logisticsCompanyId,
			@Parameter(name = "logisticsCompanyName", description = "﻿物流公司") String logisticsCompanyName,
			@Parameter(name = "materials", description = "附件信息 多附件以逗号分割") String materials
	);

	@Permission
	@Action(version = FinVersion1.class, description = "修改融资监管合同信息")
	public void updateSupervisionContract(
			@Parameter(name = "supervisionContractId", description = "融资监管合同ID") Long supervisionContractId,
			@Parameter(name = "contractSignDate", description = "签订时间", nullable = true) String contractSignDate,
			@Parameter(name = "logisticsCompanyId", description = "﻿物流公司ID") Long logisticsCompanyId,
			@Parameter(name = "logisticsCompanyName", description = "﻿物流公司") String logisticsCompanyName,
			@Parameter(name = "materials", description = "附件信息 多附件以逗号分割") String materials
	);

	@Permission
	@Action(version = FinVersion1.class, description = "查询融资监管合同信息-根据合同ID(监管合同)")
	public SupervisionContractDetail inquireSupervisionContractDetail(
			@Parameter(name = "supervisionContractId", description = "融资监管合同ID") Long supervisionContractId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "查询融资监管合同信息-根据融资ID")
	public SupervisionContractDetail inquireFinanceSupervisionContract(
			@Parameter(name = "financeId", description = "﻿融资信息ID") Long financeId
	);
}